<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">

    <form class="well form-inline margin-top-20" method="post" action="{:url('order/index')}">
        订单状态:
        <select class="form-control" name="order_status" style="width: 140px;">
            <option value='-2'<eq name="order_status" value="-2">selected</eq>>全部</option>
            <option value='-1'<eq name="order_status" value="-1">selected</eq>>取消订单</option>
            <option value='0'<eq name="order_status" value="0">selected</eq>>未付款</option>
            <option value='1'<eq name="order_status" value="1">selected</eq>>已付款，待发货</option>
            <option value='2'<eq name="order_status" value="2">selected</eq>>已发货</option>
            <option value='3'<eq name="order_status" value="3">selected</eq>>已收货</option>
            <option value='4'<eq name="order_status" value="4">selected</eq>>订单完成</option>
            <option value='5'<eq name="order_status" value="5">selected</eq>>退换货申请</option>
            <option value='6'<eq name="order_status" value="6">selected</eq>>退换货同意，待用户发货</option>
            <option value='7'<eq name="order_status" value="7">selected</eq>>退换货拒绝</option>
            <option value='8'<eq name="order_status" value="8">selected</eq>>退货开始发货</option>
            <option value='9'<eq name="order_status" value="9">selected</eq>>退货商家收货</option>
            <option value='10'<eq name="order_status" value="10">selected</eq>>退换货卖家发货</option>
            <option value='10'<eq name="order_status" value="11">selected</eq>>退换货买家收货，退换货完成</option>
            <option value='10'<eq name="order_status" value="12">selected</eq>>已结算</option>
        </select> &nbsp;&nbsp;
        下单时间:
        <input type="text" class="form-control js-bootstrap-datetime" name="start_time"
               value="{$start_time|default=''}"
               style="width: 140px;" autocomplete="off">-
        <input type="text" class="form-control js-bootstrap-datetime" name="end_time"
               value="{$end_time|default=''}"
               style="width: 140px;" autocomplete="off"> &nbsp; &nbsp;
        订单号:
        <input type="text" class="form-control" name="order_no" style="width: 200px;"
               value="{$order_no|default=''}" placeholder="请输入订单号...">
        <input type="submit" class="btn btn-primary" value="搜索"/>
        <a class="btn btn-danger" href="{:url('order/index')}">清空</a>
    </form>
    <form class="js-ajax-form" action="" method="post">

        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th width="50">ID</th>
                <th>订单号</th>
                <th width="100">买家</th>
                <th width="180">订单金额</th>
                <th width="230">下单时间</th>
                <th width="370">收货信息</th>
                <th width="100">订单状态</th>
                <th width="90">操作</th>
            </tr>
            </thead>
                <foreach name="order_list" item="vo">
                <tr>
                    <td>{$vo.order_id}</td>
                    <td>{$vo.order_no}</td>
                    <td>{$vo.user.user_nickname|default=$vo['user']['user_nickname']}</td>
                    <td>￥{$vo.pay_money}+{$vo.pay_point}积分</td>
                    <td>{:date('Y-m-d H:i:s',$vo['create_time'])}</td>
                    <td>{:get_city_info($vo['receiver_province'],$vo['receiver_city'],$vo['receiver_district'])}{$vo.receiver_address}</td>
                    <td>{:cmf_get_order_status($vo['order_status'])}</td>
                    <td><a href="javascript:;" class="btn btn-info order_info" data="{$vo.order_id}">查看</a></td>
                </tr>
                </foreach>
            <tfoot>
            <tr>
                <th width="50">ID</th>
                <th>订单号</th>
                <th width="100">买家</th>
                <th width="180">订单金额</th>
                <th width="230">下单时间</th>
                <th width="370">收货信息</th>
                <th width="100">订单状态</th>
                <th width="90">操作</th>
            </tr>
            </tfoot>
        </table>

        <ul class="pagination">{$page|default=''}</ul>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script>
    $(function () {
        $('.order_info').click(function () {
            var order_id   =$(this).attr('data');
            parent.openIframeLayer(
                "/admin/order/order_info.html?order_id=" + order_id,
                '订单详情',
                {
                    area: ['95%', '90%'],
                }
            );
        })
    })
</script>
</body>
</html>